#ifndef _UI_MANAGER_H
#define _UI_MANAGER_H
#include <command.h>
#include <display_manager.h>
#include <input_manager.h>
#define BUTTON_DEFAULT_COLOR 	0xff0000
#define BUTTON_PRESSED_COLOR 	0x00ff00
#define BUTTON_TEXT_COLOR		0x000000
#define BUTTON_PERCENT_COLOR	0x0000ff

struct Button;

typedef int (*ONEDRAW_FUNC)(struct Button *ptButton , PDispBuffer ptDispBuffer);
typedef int (*ONPRESSED_FUNC)(struct Button *ptButton , PDispBuffer ptDispBuffer , PInputEvent ptInputEvent);

typedef struct Button{
	int status;
	char * name;
	int iFontSize;
	Region tButtonRegion;
	ONEDRAW_FUNC OnDraw;
	ONPRESSED_FUNC OnPressed;
}Button , *PButton;

void InitButton(PButton ptButton , char * name , PRegion ptRegion , ONEDRAW_FUNC OnDraw , ONPRESSED_FUNC OnPressed);
#endif
